package org.example.factorymethod;

import com.alibaba.fastjson.JSONObject;

public class FactoryMethodTest {
    public static void main(String[] args) {
        ProductFactory factory = new ProductFactory();
        IProduct a = factory.create("A");
        System.out.println(JSONObject.toJSONString(a));
        a = factory.create("B");
        System.out.println(JSONObject.toJSONString(a));
    }
}
